package com.zz.admin.testDataTypesManagement.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.io.Serial;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.LocalDateTime;
import java.util.Map;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

/**
 * 数据类型示例实体类
 *
 * @author zl
 * @since 2025-11-23 14:28:32
 */
@Data
@TableName(value = "test_data_types", autoResultMap = true)
public class TestDataTypes implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    /**
     * 主键ID
     */
    @TableId
    @TableField(value = "id" )
    private String id;

    /**
     * 用户名(varchar)
     */
    @TableField(value = "username" )
    private String username;

    /**
     * 性别(char)
     */
    @TableField(value = "gender" )
    private String gender;

    /**
     * 描述(text)
     */
    @TableField(value = "description" )
    private String description;

    /**
     * 出生日期(date)
     */
    @TableField(value = "birth_date" )
    private LocalDate birthDate;

    /**
     * 创建时间(datetime)
     */
    @TableField(value = "created_datetime" )
    private LocalDateTime createdDatetime;

    /**
     * 登录时间(time)
     */
    @TableField(value = "login_time" )
    private LocalTime loginTime;

    /**
     * 更新时间(timestamp)
     */
    @TableField(value = "updated_at" )
    private LocalDateTime updatedAt;

    /**
     * 年龄(int)
     */
    @TableField(value = "age" )
    private Integer age;

    /**
     * 总浏览次数(bigint)
     */
    @TableField(value = "total_views" )
    private Long totalViews;

    /**
     * 身高(float)
     */
    @TableField(value = "height" )
    private BigDecimal height;

    /**
     * 体重(double)
     */
    @TableField(value = "weight" )
    private BigDecimal weight;

    /**
     * 薪资(decimal)
     */
    @TableField(value = "salary" )
    private BigDecimal salary;

    /**
     * 本地值
     */
    @TableField(value = "locale_value", typeHandler = JacksonTypeHandler.class )
    private Map<String, Object> localeValue;

    /**
     * 删除标识(0:未删除 1:已删除)
     */
    @TableField(value = "del_flag" )
    private String delFlag;


    // ================= 以下为自定义字段 =================

}
